if(typeof RequestClient=="undefined"){
var RequestClient = {
	
	block : false,

	/**
	 * 
	 * Ajax call for action 
	 * @methodOf RequestClient
	 * @param paramObject 
	 *    actionId
	 *    query
	 *      query string which is sending to server
	 *    form
	 *      form id string or form HTML element 
	 *    sucessCallback
	 *       call back function for sucess
	 *    failedCallback
	 *        call back function for failure
	 */
	doAjaxRequest : function(paramObject, obj){
		if (this.block) return;
		var Yl = YAHOO.lang;
		if(Yl.isFunction(paramObject.successCallback) && !Yl.isValue(paramObject.sucessCallback)){
			paramObject.sucessCallback = paramObject.successCallback;
		}
		
		var url = paramObject.url;
		if(url ){
			url = url + "?type=ajax";
			var formData = "";
			if (paramObject.form){
				formData = YAHOO.util.Connect.setForm(paramObject.form, paramObject.isUpload);
			} else {
				 YAHOO.util.Connect.resetFormState();
			}
			var me = this;
			
			var callback={
				success: me.success.bind(me, obj),
				failure: me.failure.bind(me, obj),
				scope: me,
				argument : paramObject
			};
			if(paramObject.timeout) {
				callback.timeout = paramObject.timeout;
			}
			
			var queryParams = null;
			if(typeof paramObject.query == "string") {
				queryParams = $H(paramObject.query.toQueryParams());
			}else if(paramObject.query instanceof Hash ) {
				queryParams = paramObject.query;
			} else {
				queryParams = $H(paramObject.query);
			}
			
			var queryString = queryParams.toQueryString();

			var request = YAHOO.util.Connect.asyncRequest('POST',url,callback, queryString);
		}else{
		}
	},
	/**
	 * 	 
	 * @methodOf RequestClient
	 */	
	success:function(obj, o){
		var paramObject = o.argument;
		if(paramObject.sucessCallback && typeof paramObject.sucessCallback =="function") {
			paramObject.sucessCallback(o.responseText);
		}
	},
	/**
	 * 	 
	 * @methodOf RequestClient
	 */
	failure: function(obj, oResponse) {
		var paramObject = oResponse.argument;
		if(paramObject.failedCallback && 
				typeof paramObject.failedCallback =="function") {
			paramObject.failedCallback(oResponse);
		}
	}
};
}